package core
{
import flash.utils.setTimeout;

import framework.dao.EntryUtil;




public class DataObjectLib
{
	public function DataObjectLib()
	{
	}
	
	public static function initialize():void
	{
       
	}
	
	public static function setupData(completeCallBack:Function, configData:XML = null, questData:XML = null):void
	{
		

		startSetup(completeCallBack);
	}
	
	private static var groups:Array = [];
	
	private static function startSetup(callBack:Function):void
	{
		var list:Array = groups.splice(0, 1)[0];
		for (var i:int = 0; i < list.length; i++)
		{
			EntryUtil.mapping(list[i].data, list[i].classRef);
		}		
		if (groups.length == 0) 
		{
			if (callBack != null)
			{
				callBack();
			}
			return;
		}		
		
		setTimeout(startSetup, 100, callBack);
	}
}
}


